<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});


Route::group(['prefix'=>'admin'],function(){
    Route::get('login',['as' => 'Admin.Home.login', 'uses' => 'AdminController@login']);
    Route::get('user-list',['as' => 'Admin.Home.userList', 'uses' => 'AdminController@userList']);
    Route::get('banner-list',['as' => 'Admin.Home.bannerList', 'uses' => 'AdminController@bannerList']);
    Route::get('banner-set',['as' => 'Admin.Home.bannerSet', 'uses' => 'AdminController@bannerSet']);
    Route::get('change-Pwd',['as' => 'Admin.Home.changePwd', 'uses' => 'AdminController@changePwd']);
    Route::get('admin-list',['as' => 'Admin.Home.adminList' , 'uses' => 'AdminController@adminList']);
    Route::get('admin-set',['as' => 'Admin.Home.adminSet' , 'uses' => 'AdminController@adminSet']);
    Route::get('classify-list',['as' => 'Admin.Home.classifyList' , 'uses' => 'AdminController@classifyList']);
    Route::get('project-list',['as' => 'Admin.Home.projectList' , 'uses' => 'AdminController@projectList']);
    Route::get('point-item-list',['as' => 'Admin.Home.pointItemList' , 'uses' => 'AdminController@pointItemList']);
    Route::get('point-item-img-list',['as' => 'Admin.Home.pointItemImgList' , 'uses' => 'AdminController@pointItemImgList']);
    Route::get('point-item-process-img-list',['as' => 'Admin.Home.pointItemImgProcessList' , 'uses' => 'AdminController@pointItemImgProcessList']);
    Route::get('pointList',['as' => 'Admin.Home.pointList' , 'uses' => 'AdminController@pointList']);
    Route::get('pointImgs',['as' => 'Admin.Home.pointImgs' , 'uses' => 'AdminController@pointImgs']);
    Route::get('pointCheck',['as' => 'Admin.Home.pointCheck' , 'uses' => 'AdminController@pointCheck']);
    Route::get('showImg',['as' => 'Admin.Home.showImg' , 'uses' => 'AdminController@showImg']);

    Route::get('vip-rule-list',['as' => 'Admin.Home.vipRuleList' , 'uses' => 'AdminController@vipRuleList']);
    Route::get('user-Vip-list',['as' => 'Admin.Home.userVipList' , 'uses' => 'AdminController@userVipList']);

});
    Route::group(['prefix'=>'api', 'namespace'=>'Api'],function(){
            Route::get('wxLogin',['as'=>'Api.Auth.wxLogin','uses'=>'AuthController@wxLogin']);
            Route::get('goToUrl',['as'=>'Api.Auth.goToUrl','uses'=>'AuthController@goToUrl']);
            Route::any('wechatCallback',['as'=>'Api.Auth.wechatCallback','uses'=>'AuthController@wechatCallback']);
            Route::post('wxAppLogin',['as'=>'Api.Auth.wxAppLogin','uses'=>'AuthController@wxAppLogin']);
            Route::post('sendVerificationCode',['as'=>'Api.Auth.sendVerificationCode','uses'=>'AuthController@sendVerificationCode']);
            Route::post('bindingPhone',['as'=>'Api.Auth.bindingPhone','uses'=>'AuthController@bindingPhone']);
            Route::post('getUserInfo',['as'=>'Api.UCenter.getUserInfo','uses'=>'UCenterController@getUserInfo']);
            Route::get('getBannerList',['as'=>'Api.sys.getBannerList','uses'=>'SystemController@getBannerList']);
            Route::get('getFunctionStatus',['as'=>'Api.sys.getFunctionStatus','uses'=>'SystemController@getFunctionStatus']);

        Route::group(['prefix' => 'admin','namespace'=>'Admin'],function(){
            Route::post('auth/sign-in',['as'=>'Api.Admin.Auth.signInAdmin','uses'=>'AuthController@signInAdmin']);
            Route::post('auth/change-pwd',['as'=>'Api.Admin.Auth.changePassword','uses'=>'AuthController@changePassword']);
            Route::get('auth/signOut',['as'=>'Api.Admin.Auth.signOut','uses'=>'AuthController@signOut']);
            Route::post('sys/setBanner',['as'=>'Api.Admin.sys.setBanner','uses'=>'SystemController@setBanner']);
            Route::post('sys/delBanner',['as'=>'Api.Admin.sys.delBanner','uses'=>'SystemController@delBanner']);
            Route::post('sys/setAdmin',['as' => 'Api.Admin.sys.setAdmin','uses' => 'SystemController@setAdmin']);
            Route::post('sys/delAdmin',['as'=>'Api.Admin.sys.delAdmin','uses'=>'SystemController@delAdmin']);
            Route::post('sys/addClassify',['as'=>'Api.Admin.sys.addClassify','uses'=>'SystemController@addClassify']);
            Route::post('sys/delClassify',['as'=>'Api.Admin.sys.delClassify','uses'=>'SystemController@delClassify']);
            Route::post('sys/setAuthorization',['as'=>'Api.Admin.sys.setAuthorization','uses'=>'SystemController@setAuthorization']);
            Route::post('sys/setProjectStatus',['as'=>'Api.Admin.sys.setProjectStatus','uses'=>'SystemController@setProjectStatus']);
            Route::post('sys/userCheckComplete',['as'=>'Api.Admin.sys.userCheckComplete','uses'=>'SystemController@userCheckComplete']);
            Route::get('sys/setAutoCheck',['as'=>'Api.Admin.sys.setAutoCheck','uses'=>'SystemController@setAutoCheck']);
            Route::get('sys/setManualCheck',['as'=>'Api.Admin.sys.setManualCheck','uses'=>'SystemController@setManualCheck']);
            Route::post('sys/setFree',['as'=>'Api.Admin.sys.setFree','uses'=>'SystemController@setFree']);

            Route::post('sys/addVipRule',['as'=>'Api.Admin.sys.addVipRule','uses'=>'SystemController@addVipRule']);
            Route::post('sys/delVipRule',['as'=>'Api.Admin.sys.delVipRule','uses'=>'SystemController@delVipRule']);

            Route::post('sys/addSteelFormat',['as'=>'Api.Admin.sys.addSteelFormat','uses'=>'SystemController@addSteelFormat']);
            Route::post('sys/delSteelFormat',['as'=>'Api.Admin.sys.delSteelFormat','uses'=>'SystemController@delSteelFormat']);

            Route::post('sys/addFactoryCount',['as'=>'Api.Admin.sys.addFactoryCount','uses'=>'SystemController@addFactoryCount']);
            Route::post('sys/delFactoryCount',['as'=>'Api.Admin.sys.delFactoryCount','uses'=>'SystemController@delFactoryCount']);

            Route::post('sys/setUserInfoRemark',['as'=>'Api.Admin.sys.setUserInfoRemark','uses'=>'SystemController@setUserInfoRemark']);

            Route::post('sys/delManagerUser',['as'=>'Api.Admin.sys.delManagerUser','uses'=>'SystemController@delManagerUser']);
            Route::post('sys/setManagerUser',['as'=>'Api.Admin.sys.setManagerUser','uses'=>'SystemController@setManagerUser']);

            Route::post('auth/getPermissionList',['as'=>'Api.Admin.Auth.getPermissionList','uses'=>'AuthController@getPermissionList']);
            /*绑定权限*/
            Route::get('binding-permissions',['as' => 'Admin.Home.bindingPermissions', 'uses' => 'AdminController@bindingPermissions']);
            Route::post('auth/getRoleList',['as'=>'Api.Admin.Auth.getRoleList','uses'=>'AuthController@getRoleList']);
            Route::post('bindingPermissions',['as'=>'Api.Admin.sys.bindingPermissions','uses'=>'SystemController@bindingPermissions']);
            Route::post('delRole',['as'=>'Api.Admin.sys.delRole','uses'=>'SystemController@delRole']);
            Route::post('delPermissions',['as'=>'Api.Admin.sys.delPermissions','uses'=>'SystemController@delPermissions']);
            Route::post('setPermissions',['as'=>'Api.Admin.sys.setPermissions','uses'=>'SystemController@setPermissions']);
            Route::post('setRole',['as'=>'Api.Admin.sys.setRole','uses'=>'SystemController@setRole']);



            //添加、删除、绑定公司
            Route::post('sys/companySet',['as'=>'Api.Admin.Sys.companySet','uses'=>'SystemController@companySet']);
            Route::post('sys/companyDel',['as'=>'Api.Admin.Sys.companyDel','uses'=>'SystemController@companyDel']);
            Route::post('sys/companyBind',['as'=>'Api.Admin.Sys.companyBind','uses'=>'SystemController@companyBind']);
            Route::post('sys/companyUnbind',['as'=>'Api.Admin.Sys.companyUnbind','uses'=>'SystemController@companyUnbind']);
            //项目审核
            Route::post('sys/adminAllow',['as'=>'Api.Admin.sys.adminAllow','uses'=>'SystemController@adminAllow']);
            Route::post('sys/adminDeny',['as'=>'Api.Admin.sys.adminDeny','uses'=>'SystemController@adminDeny']);


        });

    });
Route::group(['prefix' => 'file'],function(){
    Route::post('upload-img',['as'=>'Api.File.upload','uses'=>'ImageController@upload']);
    Route::post('plate-upload',['as'=>'Api.File.plateUpload','uses'=>'ImageController@plateUpload']);
    Route::post('upload-audio',['as'=>'Api.File.uploadAudio','uses'=>'ImageController@uploadAudio']);
    Route::get('show-image/{id}',['as'=>'Api.File.showImageById','uses'=>'ImageController@showImageById']);
    Route::get('reloadImages',['as'=>'Api.File.reloadImages','uses'=>'ImageController@reloadImages']);
    Route::post('uploadBase64Image',['as'=>'Api.File.uploadBase64Image','uses'=>'ImageController@uploadBase64Image']);
    Route::post('upload-user-photo',['as'=>'Api.File.uploadUserPhoto','uses'=>'ImageController@uploadUserPhoto']);
    Route::post('imgeshi',['as'=>'Api.File.imgceshi','uses'=>'ImageController@imgceshi']);

});